package com.cy.dao;

import java.util.List;
import org.hibernate.LockMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.cy.bean.User;

 

public class UserDAO extends HibernateDao {
	private static final Logger log = LoggerFactory.getLogger(UserDAO.class);

	public boolean checkAuthority(String name, String paw) {
		String queryString = "from User where name='"+name+"' and paw='"+paw+"'";
		List<User> list = getHibernateTemplate().find(queryString);
		return (list.size()==1);
	}
	 
}